<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>

	<link href="../style/authority/common_style.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="../style/bootstrap.min.css" />
	<script type="text/javascript" src="../scripts/bootstrap.min.js" ></script>
	<title>信息管理系统</title>

</head>
<body>

<div id="main">
	<div>
		<div align="left" style="background-color: #E7E7E7;">   <span class="glyphicon glyphicon-refresh" onclick="dome()"></span><span style="color: #990000">&nbsp;刷新</span></div>
	</div>
	<div>
		<table class="table table-bordered">
			<thead>
			<tr>
				<th class="text-center">事项</th>
				<th class="text-center">时间</th>
				<th class="text-center">处理人</th>
				<th class="text-center">处理操作</th>
				<th class="text-center">处理意见</th>
			</tr>
			</thead>
			<tbody>
			<tr th:each="p:${pu.dataS}">

				<td th:text="${p.approval.event}">Tanmay</td>
				<td th:text="${#dates.format(p.approval.time,'yyyy年MM月dd日 HH时mm分ss秒')}">Bangalore</td>
				<td th:text="${p.user.name}">560001</td>
				<td  th:if="${p.approval.operations==0}">不同意</td>
				<td  th:if="${p.approval.operations==1}">同意</td>
				<td th:text="${p.approval.opinion}">wsef</td>
			</tr>

			</tbody>
		</table>
		<div class="ui_tb_h30">
			<div class="ui_flt" style="height: 30px; line-height: 30px;">
				共有
				<span class="ui_txt_bold04" th:text="${pu.totalCount}">90</span> 条记录，当前第
				<span class="ui_txt_bold04" th:text="${pu.currentPage}"></span> /<span th:text="${pu.pageCount}"></span>页
			</div>
			<div class="ui_frt">
				<!--    如果是第一页，则只显示下一页、尾页 -->
				<a th:href="@{/Processed(page=1)}"><input type="button" value="首页" class="ui_input_btn01" /></a>
				<a th:if="${pu.currentPage==1}"><input type="button" value="上一页" class="ui_input_btn01" /></a>
				<a th:if="${pu.currentPage!=1}" th:href="@{/Processed(page=${pu.currentPage-1})}"><input type="button" value="上一页" class="ui_input_btn01" /></a>

				<a th:if="${pu.currentPage==pu.pageCount}"><input type="button" value="下一页" class="ui_input_btn01" onclick="jumpNormalPage(2);" /></a>
				<a th:if="${pu.currentPage!=pu.pageCount}" th:href="@{/Processed(page=${pu.currentPage+1})}"><input type="button" value="下一页" class="ui_input_btn01" onclick="jumpNormalPage(2);" /></a>
				<a th:href="@{/Processed(page=${pu.pageCount})}"><input type="button" value="尾页" class="ui_input_btn01" onclick="jumpNormalPage(9);" /></a>
				<!--     如果是最后一页，则只显示首页、上一页 -->
				<input type="hidden" th:value="${pu.pageCount}" id="pageCount"/>
				转到第<input type="text" id="pp"  class="ui_input_txt01" />页
				<input type="button" class="ui_input_btn01" value="跳转" onclick="pp()" /><a id="a2"></a>
			</div>
		</div>

	</div>

</div>



</body>
</html>
<script>
    function pp() {
        var pp=$("#pp").val();
        var pageCount=$("#pageCount").val();
        if(!(pp.trim())){
            alert("跳转框不能为空哦")
        }else if(pp>pageCount){
            alert("跳转框不能超出分页最大值哦")
        }else if(pp<=0){
            alert("跳转框不能小于1哦")
        }else{
            $("#a2").attr("href","/Processed?page="+pp)
            document.getElementById("a2").click();
        }



    }
    function dome(){
        window.location.reload();
    }

</script>